<div class="check">

    <form class="form-horizontal" action="<?= lang_url('transfers/confirmation') ?>" method="get" id="doreservation">

        <?php
        $R_STATUS = WAITNG_PAYMENT;

        $trans_name = $reservation->city_from;

        if ($reservation->city_from_type === 'Airport')
            $trans_name.= ' Airport';

        $trans_name.= '<span> (' . $reservation->country_from_ID . ')</span> - ';

        $trans_name .= $reservation->city_to;

        if ($reservation->city_to_type === 'Airport')
            $trans_name.= ' Airport';

        $trans_name.= '<span> (' . $reservation->country_to_ID . ')</span>';

        if (isset($_GET['return_transfer'])):
            $trans_name.= ' - ';
            $trans_name.= $reservation->city_from_type === 'Airport' ? $reservation->city_from . ' Airport' : $reservation->city_from;
            $trans_name.= '<span> (' . $reservation->country_to_ID . ')</span>';
        endif;

        $service_name = $reservation->city_from_type === 'Airport' ? $reservation->city_from . ' Airport' : $reservation->city_from;
        $service_name.= ' - ';
        $service_name.= $reservation->city_to_type === 'Airport' ? $reservation->city_to . ' Airport' : $reservation->city_to;

        $one_way_service_name = $return_service_name = $service_name;

        $return_service_name .= ' - ';
        $return_service_name.= $reservation->city_from_type === 'Airport' ? $reservation->city_from . ' Airport' : $reservation->city_from;

        if (isset($_GET['return_transfer'])):
            $service_name.= ' - ';
            $service_name.= $reservation->city_from_type === 'Airport' ? $reservation->city_from . ' Airport' : $reservation->city_from;
        endif;

        $total = !isset($_GET['return_transfer']) ? $reservation->price : $reservation->return_price;

        $R_30_PERCENT = find_percent(30, $total);
        $R_30_PERCENT_ONEWAY = find_percent(30, $reservation->price);
        $R_30_PERCENT_RETURN = find_percent(30, $reservation->return_price);

        $strSel = 'selected="selected"';
        $chkSel = 'checked="checked"';
        $dispay = 'style="display:block"';
        ?>

        <input type="hidden" name="transfer_id" id="transfer_id" value="<?= $_GET['transfer_id'] ?>">
        <input type="hidden" name="nr_persons" value="<?= $_GET['nr_adults'] ?>">
        <input type="hidden" name="reservation_status" value="<?= $R_STATUS ?>">
        <input type="hidden" name="s_b_i" value="cipa-booking.com">

        <div id="payment_insurance">

            <div class="payment">
                <?php
                $this->load->view('parts/totalTransfers', array(
                    'service_total' => $total,
                    'total' => $total,
                    'service_name' => $service_name,
                    'R_30_PERCENT' => $R_30_PERCENT
                ));
                ?>
            </div>

        </div>

        <div class="sec">

            <div id="summary" class="secp clearfix">

                <img src="<?= HOST_URL_HOTELS . $reservation->path . '/thumb_182x123/' . $reservation->filename; ?>">


                <ul class="trans_summary">
                    <li class="section"><h4><?= $trans_name ?></h4></li>
                    <li><strong><?= lang('transfer') ?>:</strong> <?= $service_name ?></li>
                    <li><strong><?= lang('dtl.num_of_persons') ?>:</strong> 1 - <?= $reservation->car_max_ps ?></li>
                    <li><strong><?= lang('vehicle') ?>:</strong> <?= $reservation->car_name ?></li>
                    <li><strong><?= lang('date') ?>:</strong> <span class="transfer_dates"><?= !isset($_GET['return_transfer']) ? $_GET['check_in'] : $_GET['check_in'] . ' - ' . $_GET['check_out'] ?></span></li>
                </ul>

            </div>
            <!-- /summary-->

            <div id="passenger" class="secp clearfix">

                <h4><?= lang('c.info_reservation_holder'); ?></h4>

                <div class="half pull-left">
                    <div class="inner_prices">

                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('gender'); ?>:*</label>

                            <div class="controls">
                                <select placeholder="<?= lang('gender'); ?>" name="sex" id="sex" required>
                                    <option value=""><?= lang('gender'); ?></option>
                                    <option value="M"><?= lang('male'); ?></option>
                                    <option value="Z"><?= lang('female'); ?></option>
                                </select>
                            </div>

                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('name'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('name'); ?>" name="name" id="name" required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('date_of_birth'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('date_of_birth'); ?>" name="birth_date" id="birth_date"
                                       required value="">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label label_checkout_<?= $this->lang->mci_current() ?>"
                                   for="service"><?= lang('mobile_phone'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('mobile_phone'); ?>" name="phone" id="phone" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('city'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('city'); ?>" name="city" id="city" required value="">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="half pull-left">
                    <div class="inner_prices">
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('email'); ?>:*</label>

                            <div class="controls">
                                <input type="email" placeholder="<?= lang('email'); ?>" name="email" id="email" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('surname'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('surname'); ?>" name="surname" id="surname" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('address'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('address'); ?>" name="address" id="address" required
                                       value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('zip_code'); ?>:*</label>

                            <div class="controls">
                                <input type="text" placeholder="<?= lang('zip_code'); ?>" name="zip" id="zip" required value="">

                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="service"><?= lang('country'); ?>:*</label>

                            <div class="controls">
                                <select placeholder="<?= lang('country'); ?>" name="country" id="country" required>
                                    <option value=""><?= lang('country'); ?></option>
                                    <?php
                                    foreach (config_item('country_list') as $key => $country)
                                        echo "<option value='{$country}'>{$country}</option>";
                                    ?>
                                </select>
                            </div>
                        </div>
                    </div>

                </div>

                <div style="clear:both"></div>

                <div class="inner_prices">

                    <div class="control-group last">
                        <label class="control-label" for="service"><?= lang('note') ?>:</label>

                        <div class="controls">
                            <textarea name="notice" id="notice"></textarea>
                        </div>
                    </div>
                </div>

            </div>
            <!-- /passenger-->

            <div class="secp clearfix transfer_sec">

                <div class="half pull-left">

                    <h4 class="mb13"><?= lang('date') ?></h4>

                    <div class="inner_prices">

                        <div class="control-group">
                            <label class="control-label"><?= lang('date') ?>:*</label>
                            <div class="controls">
                                <input type="text" value="<?= $_GET['check_in'] ?>" name="oneway_start" id="check_in" class="checkinout">
                            </div>

                        </div>

                        <div class="control-group">
                            <label class="control-label"><?= lang('time') ?>:*</label>
                            <div class="controls">
                                <?= makefull("oneway_start_time", 5, 'class="time-part"'); ?>
                            </div>

                        </div>



                    </div>

                </div>

                <div class="half pull-left">

                    <h4 class="mb13"><?= lang('transfer_info') ?></h4>

                    <div class="inner_prices">

                        <?php if ($reservation->city_from_type === 'Airport'): ?>

                            <div class="control-group">

                                <label class="control-label"><?= lang('flight_number') ?>:*</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_start_flight_number" placeholder="<?= lang('flight_number') ?>" required>
                                </div>

                            </div>

                            <div class="control-group">

                                <label class="control-label"><?= lang('arriving_from') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_start_arriving_from" placeholder="<?= lang('city') ?>" >
                                </div>

                            </div>

                            <div class="control-group">

                                <label class="control-label"><?= lang('airline_name') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_start_airline_name" placeholder="<?= lang('airline_name') ?>" >
                                </div>

                            </div>

                            <div class="control-group">
                                <label class="control-label"><?= lang('to_hotel') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_end_hotel_property" placeholder="<?= lang('hotel_or_property') ?>" >
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label"><?= lang('to_address') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_end_address" placeholder="<?= lang('address') ?>" >
                                </div>

                            </div>

                        <?php else: ?>

                            <div class="control-group">
                                <label class="control-label"><?= lang('from_hotel') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_start_hotel_property" placeholder="<?= lang('hotel_or_property') ?>" required>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label"><?= lang('from_address') ?>:</label>
                                <div class="controls">
                                    <input type="text" value="" name="oneway_start_address" placeholder="<?= lang('address') ?>" >
                                </div>

                            </div>

                        <?php endif; ?>

                    </div>

                </div>

            </div>

            <!-- /Pickup location-->

            <div class="secp clearfix transfer_sec">

                <div class="hide clearfix" <?php if (isset($_GET['return_transfer'])) echo $dispay; ?> id="ret_transfer_controll">

                    <div class="half pull-left">

                        <h4 class="mb13"><?= lang('date_return') ?></h4>

                        <div class="inner_prices">

                            <div class="control-group">
                                <label class="control-label"><?= lang('date') ?>:*</label>
                                <div class="controls">
                                    <input type="text" value="<?= $_GET['check_out'] ?>" name="return_start" id="check_out" class="checkinout">
                                </div>

                            </div>

                            <div class="control-group">
                                <label class="control-label"><?= lang('time') ?>:*</label>
                                <div class="controls">
                                    <?= makefull("return_start_time", 5, 'class="time-part"'); ?>
                                </div>

                            </div>

                        </div>

                    </div>

                    <div class="half pull-left">

                        <h4 class="mb13"><?= lang('transfer_info_return') ?></h4>

                        <div class="inner_prices">

                            <?php if ($reservation->city_to_type === 'Airport'): ?>

                                <div class="control-group">

                                    <label class="control-label"><?= lang('flight_number') ?>:*</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_start_flight_number" placeholder="<?= lang('flight_number') ?>" required>
                                    </div>

                                </div>

                                <div class="control-group">

                                    <label class="control-label"><?= lang('arriving_from') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_start_arriving_from" placeholder="<?= lang('city') ?>" >
                                    </div>

                                </div>

                                <div class="control-group">

                                    <label class="control-label"><?= lang('airline_name') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_start_airline_name" placeholder="<?= lang('airline_name') ?>" >
                                    </div>

                                </div>

                                <div class="control-group">
                                    <label class="control-label"><?= lang('to_hotel') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_end_hotel_property" placeholder="<?= lang('hotel_or_property') ?>" >
                                    </div>
                                </div>

                                <div class="control-group">
                                    <label class="control-label"><?= lang('to_address') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_end_address" placeholder="<?= lang('address') ?>" >
                                    </div>

                                </div>

                            <?php else: ?>

                                <div class="control-group">
                                    <label class="control-label"><?= lang('from_hotel') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_end_hotel_property" placeholder="<?= lang('hotel_or_property') ?>" required>
                                    </div>
                                </div>

                                <div class="control-group">
                                    <label class="control-label"><?= lang('from_address') ?>:</label>
                                    <div class="controls">
                                        <input type="text" value="" name="return_end_address" placeholder="<?= lang('address') ?>" >
                                    </div>

                                </div>

                            <?php endif; ?>

                        </div>

                    </div>

                </div>

                <div class="inner_prices">
                    <div class="control-group">
                        <label class="control-label"><?= lang('book_a_return') ?>:</label>
                        <div class="controls">
                            <input type="checkbox" class="" value="1" name="return_transfer" id="return_transfer" <?php if (isset($_GET['return_transfer'])) echo 'checked'; ?>>

                        </div>

                    </div>

                </div>

            </div>

            <div id="payment_method" class="secp clearfix">

                <div class="half pull-left">

                    <h4><?= lang('c.methods_of_payment'); ?></h4>

                    <div class="inner_prices">

                        <ul>
                            <li class="clearfix">
                                <input type="radio" name="payment_method" value="Credit card online" checked><?= lang('c.cc_online'); ?>
                            </li>

                        </ul>
                    </div>
                </div>

                <div class="half pull-left">

                    <h4><?= lang('foot.payment'); ?></h4>

                    <div class="inner_prices" style="padding-right: 0">

                        <ul>
                            <li class="clearfix">
                                <input type="radio" name="payment_options" value="Payment in full" checked><?= lang('c.payment_in_full'); ?>
                            </li>
                            <li class="clearfix">
                                <input type="radio" name="payment_options" value="30% now and 70% balance upon arrival"><?= lang('c.30_70'); ?>
                            </li>

                        </ul>
                    </div>
                </div>

            </div>
            <!-- /payment_method-->



            <div id="terms" class="secp clearfix">

                <input type="checkbox" id="agree" name="agree" checked="checked">
                <?= lang('c.i_have_read'); ?>
                <a href="<?= lang_url('cipatravel/termss-37') ?>"><?= lang('c.general_terms'); ?>
                    <? if ($this->lang->mci_current() != 'me') echo '&'; ?>
                    <?= lang('c.conditions'); ?></a>
                <span class="emp">*</span>

            </div>
            <!-- /terms-->

        </div>

        <div class="hold_booknow">
            <input type="submit" class="booknow" value="<?= lang('make_reservation'); ?>">
        </div>
        <!-- /booknow-->

    </form>

</div>

<script type="text/javascript">

    var transfer_price = '<?= $reservation->price ?>';
    var transfer_return_price = '<?= $reservation->return_price ?>';

    var service_name = '<?= $one_way_service_name ?>';
    var service_name_return = '<?= $return_service_name ?>';

    var R_30_PERCENT = '<?= $R_30_PERCENT_ONEWAY ?>';
    var R_30_PERCENT_RETURN = '<?= $R_30_PERCENT_RETURN ?>';

</script>